<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<!--/*@thymesVar id="foreignCurrencyDenominations" type="java.util.List<com.weirong.smartvault.backservice.entity_model.ForeignCurrencyDenominationModel>"*/-->
<!--/*@thymesVar id="foreignCurrencyTypes" type="java.util.List<com.weirong.smartvault.backservice.entity_model.ForeignCurrencyTypeModel>"*/-->
    <div class="container">
        <div class="well well-lg" style="margin-bottom: 0px;">
          <div align="right" style="padding-bottom: 5px;">
            <form>
            <table>
              <tr width="100%">
                <td width="70%">
                  <select name="type_code" class="form-control select select-primary select-block mbl" style="margin-bottom: 0px;">
                      <optgroup label="币种">
                        <option th:each="type:${foreignCurrencyTypes}" th:value="${type.getCode()}" th:text="${type.getName()}">美元</option>
                      </optgroup>
                    </select>
                </td><td width="1%">&nbsp;</td>
                <td><input type="submit" value="查询" class="btn btn-embossed btn-primary"/>&nbsp;&nbsp;
                  <button class="btn btn-embossed btn-primary" data-toggle="modal" data-target=".parent-type" type="button">新增</button></td>
              </tr>
            </table>
            </form>
          </div>
          <table class="table table-bordered" style="margin-bottom: 0px;">
            <tr class="info" width="100%">
              <th width="5%">序号</th>
              <th width="10%">面额名称</th>
              <th width="10%">面额数值</th>
              <th width="10%">所属币种</th>
              <th  >描述</th>
              <th  width="10%">操作</th>
            </tr>
            <tr th:each="denomination,iterstat:${foreignCurrencyDenominations}">
              <td th:text="${iterstat.index+1}">1</td>
              <td th:text="${denomination.getName()}">5</td>
              <td th:text="${denomination.getValue()}">5</td>
              <td th:text="${denomination.getTypeNmae()}">美元</td>
              <td th:text="${denomination.getDescription()}"></td>
              <td><a href="#" data-toggle="modal" th:attr="data-target=${'.denomination'+denomination.getId()}" >修改</a>&nbsp;&nbsp;<a th:href="@{/API/denominationDelete(id=${denomination.getId()})}" data-toggle="modal" >删除</a></td>
            </tr>
          </table>
        </div>
    </div>
    <div class="modal fade parent-type" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
      <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title">新增面额</h4>
          </div>
          <form method="post">
          <div class="modal-body">
            <table style="width: 800px;">
              <tr width="100%">
                <td width="10%">&nbsp;</td><td width="20%">面额名称</td><td><input type="text" name="name" placeholder="请输入面额名称" class="form-control" /></td>
              </tr>
              <tr>
                <td colspan="4">&nbsp;</td>
              </tr>
              <tr>
                <td>&nbsp;</td><td>面额数量</td><td><input type="text" name="value" placeholder="请输入面额数量" class="form-control" /></td>
              </tr>
              <tr>
                <td colspan="4">&nbsp;</td>
              </tr>
              <tr>
                <td>&nbsp;</td><td>所属币种</td>
                <td>
                  <select name="typeCode" class="form-control select select-primary select-block mbl" style="margin-bottom: 0px;">
                      <optgroup label="币种">
                        <option th:each="type:${foreignCurrencyTypes}" th:value="${type.getCode()}" th:text="${type.getName()}">美元</option>
                      </optgroup>
                    </select>
                </td>
              </tr>
              <tr>
                <td colspan="4">&nbsp;</td>
              </tr>
              <tr>
                <td>&nbsp;</td><td>描述</td><td><textarea name="description" class="form-control" rows="3"></textarea></td>
              </tr>
            </table>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            <input type="submit" value="Save changes" class="btn btn-primary"/>
          </div>
          </form>
        </div>
      </div>
    </div>
    <div th:each="denomination:${foreignCurrencyDenominations}" th:class="|modal fade denomination${denomination.getId()}|" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
      <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title">修改面额</h4>
          </div>
          <form method="post">
          <div class="modal-body">
            <input name="id" type="hidden" th:value="${denomination.getId()}"/>
            <table style="width: 800px;">
              <tr width="100%">
                <td width="10%">&nbsp;</td><td width="20%">面额名称</td><td><input type="text" name="name" placeholder="请输入面额名称" class="form-control" th:value="${denomination.getName()}"/></td>
              </tr>
              <tr>
                <td colspan="4">&nbsp;</td>
              </tr>
              <tr>
                <td>&nbsp;</td><td>面额数量</td><td><input type="text" name="value" placeholder="请输入面额数量" class="form-control" th:value="${denomination.getValue()}"/></td>
              </tr>
              <tr>
                <td colspan="4">&nbsp;</td>
              </tr>
              <tr>
                <td>&nbsp;</td><td>所属币种</td>
                <td>
                  <select name="typeCode" class="form-control select select-primary select-block mbl" style="margin-bottom: 0px;">
                      <optgroup label="币种">
                        <option th:each="type:${foreignCurrencyTypes}" th:value="${type.getCode()}" th:text="${type.getName()}">美元</option>
                      </optgroup>
                    </select>
                </td>
              </tr>
              <tr>
                <td colspan="4">&nbsp;</td>
              </tr>
              <tr>
                <td>&nbsp;</td><td>描述</td><td><textarea name="description" class="form-control" rows="3" th:value="${denomination.getDescription()}"></textarea></td>
              </tr>
            </table>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            <input type="submit" value="Save changes" class="btn btn-primary"/>
          </div>
          </form>
        </div>
      </div>
    </div>
</html>